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

Update fails, if run in tweo instances #261

Open
lscheffler opened this issue Jul 30, 2024 · 2 comments
Open

Update fails, if run in tweo instances #261

lscheffler opened this issue Jul 30, 2024 · 2 comments

Comments

@lscheffler
Copy link
Contributor

📝 Provide detailed reproduction steps (if any)

  1. Run RunThor.prg WITH n, where n>0 on startup routine
  2. Let more then n days pass by
  3. Run one IDE of VFP with the startup
  4. Run immediately a second IDE of VFP with the startup

✔️ Expected result

Update should proccedd in the first instance, ignoring the second

❌ Actual result

Second instance stops with an error. (no debug info since the first instance altered the prg, so source is out of date)

@Jimrnelson
Copy link
Collaborator

@lscheffler

The parameter to RunThor is used to compare today's date with the last date that Thor's CFU completed successfully (not the last date is was started).

Since the last completion date had not changed when you immediately started your second VFP session, that session would try to run CFU as well.

@rschummer
Copy link

One solution is to lock the record in the table that holds the previous update date and keep the lock until the update run is complete. Any other instances can attempt to lock the record and if they fail, don't run the update process.

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

No branches or pull requests

3 participants