Skip to content

Commit

Permalink
fixed scheduled backup triggers twice, not once, if `require_online_p…
Browse files Browse the repository at this point in the history
…layers` is enabled

fixed #20
  • Loading branch information
Fallen-Breath committed Mar 10, 2024
1 parent 9d172cc commit de76e94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion prime_backup/mcdr/crontab_job/scheduled_backup_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def run(self):
online_players = OnlinePlayerCounter.get().get_online_players()
base_msg = 'Scheduled backup player check: valid={} ignored={}'.format(online_players.valid, online_players.ignored)
if online_players is not None and len(online_players.valid) == 0:
if self.__backups_without_players > 1:
if self.__backups_without_players >= 1:
self.logger.info('{}, backup skipped'.format(base_msg))
return
self.__backups_without_players = self.__backups_without_players + 1
Expand Down

0 comments on commit de76e94

Please sign in to comment.