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

Dirq sometimes failing to write temporary messages #64

Open
tofu-rocketry opened this issue May 10, 2018 · 2 comments · May be fixed by #249
Open

Dirq sometimes failing to write temporary messages #64

tofu-rocketry opened this issue May 10, 2018 · 2 comments · May be fixed by #249
Assignees
Labels
bug good first issue Good for newcomers
Milestone

Comments

@tofu-rocketry
Copy link
Member

tofu-rocketry commented May 10, 2018

Following on from #62, while exception handling has been added in #63 for the missing IOError, these messages will still be lost, but they will be handled more nicely.

dirq seems to be sometimes failing when writing out accepted messages to the temporary directory it uses.

This could possibly be solved by retrying when adding the message to the accepted queue.

@tofu-rocketry tofu-rocketry changed the title Dirq failing to write temporary messages Dirq sometimes failing to write temporary messages May 10, 2018
@tofu-rocketry tofu-rocketry added the good first issue Good for newcomers label Jul 30, 2019
@tofu-rocketry
Copy link
Member Author

@ElliottKasoar
Copy link

I wasn't able to reproduce the issue yesterday, but for next time, could we just do something like this?

try:
    name = self._inq.add({'body': extracted_msg,
                          'signer': signer,
                          'empaid': empaid})
except OSError:
    time.sleep(0.01)
    try:
        name = self._inq.add({'body': extracted_msg,
                              'signer': signer,
                              'empaid': empaid})
    except OSError as error:
        raise error

(Or more generally a for/while loop, although we would need an extra if statement to check for the last iteration.)

DanielPerkins7 added a commit to DanielPerkins7/ssm that referenced this issue Aug 1, 2023
resolve apel#64.   i was unsure which part needed to be repeated so i just repeated the whole function until the message can be saved into the queue, im not sure if this is right though.
DanielPerkins7 added a commit to DanielPerkins7/ssm that referenced this issue Aug 1, 2023
resolve apel#64.   i was unsure which part needed to be repeated so i just repeated the whole function until the message can be saved into the queue, im not sure if this is right though.
DanielPerkins7 added a commit to DanielPerkins7/ssm that referenced this issue Aug 2, 2023
resolve apel#64. i have just repeated the procedure either until it works or until a new counter i introduced reaches 3 so there is a limit to the recursion
DanielPerkins7 added a commit to DanielPerkins7/ssm that referenced this issue Aug 2, 2023
resolve apel#64  .  repeats the procedure either until it works or until it has been repeated three times
DanielPerkins7 added a commit to DanielPerkins7/ssm that referenced this issue Aug 2, 2023
resolve apel#64  .  repeats the procedure either until it works or until it has been repeated three times
DanielPerkins7 added a commit to DanielPerkins7/ssm that referenced this issue Aug 2, 2023
resolve apel#64. loops the add calls until they work or until the for loop is exhausted. is something like this what you mean?
DanielPerkins7 added a commit to DanielPerkins7/ssm that referenced this issue Aug 3, 2023
@tofu-rocketry tofu-rocketry added this to the 3.5.0 milestone Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug good first issue Good for newcomers
Development

Successfully merging a pull request may close this issue.

3 participants