Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit 1 running object file #1071

Merged
merged 2 commits into from
Aug 31, 2023
Merged

Limit 1 running object file #1071

merged 2 commits into from
Aug 31, 2023

Conversation

xxx7xxxx
Copy link
Contributor

No description provided.

@@ -310,10 +305,9 @@ func (or *ObjectRegistry) storeConfigInLocal(config map[string]string) {
}
buff.Write(configBuff)

configLocalFileName := or.getConfigLocalFileName()
err = os.WriteFile(configLocalFileName, buff.Bytes(), 0o644)
err = os.WriteFile(or.configLocalPath, buff.Bytes(), 0o644)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before write new running_objects.json, how about rename old one to running_objects.bak.json?
Since we remove the time from file name, how about add a timestamp to config, or use os.Chtimes(fileName, currentTime, currentTime) to change to file create time?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated. Json file does not support comment, we could just use stat running_objects.json to get the time.

@codecov-commenter
Copy link

codecov-commenter commented Aug 30, 2023

Codecov Report

Patch has no changes to coverable lines.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the GitHub App Integration for your organization. Read more.

📢 Thoughts on this report? Let us know!.

@suchen-sci suchen-sci added this pull request to the merge queue Aug 31, 2023
Merged via the queue into easegress-io:main with commit 5382955 Aug 31, 2023
8 checks passed
@xxx7xxxx xxx7xxxx deleted the run branch September 1, 2023 03:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants