Currently a race condition is possible where the cron job fetching mails is still working while a new call to it fires off. This might mean there are 2 instances running simultaniously that cause a ticket being imported twice.
Possible solution would be to store the e-mail's ID with the ticket. Or check for the /seen flag through IMAP before adding it.
Currently a race condition is possible where the cron job fetching mails is still working while a new call to it fires off. This might mean there are 2 instances running simultaniously that cause a ticket being imported twice.
Possible solution would be to store the e-mail's ID with the ticket. Or check for the
/seen
flag through IMAP before adding it.