mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-02-24 14:58:35 +08:00
Use unique app spec version (#2535)
The ID is currently preserved on new deployments. Therefore we also consider the sha and the timestamp.
This commit is contained in:
parent
c699fbbd79
commit
3a9412cafd
1 changed files with 3 additions and 1 deletions
|
@ -265,9 +265,11 @@ defimpl Livebook.Hubs.Provider, for: Livebook.Hubs.Team do
|
||||||
app_deployments = TeamClient.get_agent_app_deployments(team.id)
|
app_deployments = TeamClient.get_agent_app_deployments(team.id)
|
||||||
|
|
||||||
for app_deployment <- app_deployments do
|
for app_deployment <- app_deployments do
|
||||||
|
{seconds, _} = NaiveDateTime.to_gregorian_seconds(app_deployment.deployed_at)
|
||||||
|
|
||||||
%Livebook.Apps.TeamsAppSpec{
|
%Livebook.Apps.TeamsAppSpec{
|
||||||
slug: app_deployment.slug,
|
slug: app_deployment.slug,
|
||||||
version: app_deployment.id,
|
version: "#{app_deployment.id}-#{seconds}-#{app_deployment.sha}",
|
||||||
hub_id: team.id,
|
hub_id: team.id,
|
||||||
app_deployment_id: app_deployment.id
|
app_deployment_id: app_deployment.id
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue