Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
1565 Widoki

When I use multi-threaded concurrent submissions account.move action_post ,I got an error :Due to inability to access serial synchronization updates,After my investigation, I found that it is not possible to generate the last_sequence。

how i can do


Awatar
Odrzuć
Autor Najlepsza odpowiedź
# Unable  to  generate serial numbers concurrently 

class SequenceMixin()
    def _get_last_sequence(self, relaxed=False, with_prefix=None):	​...​
query = """
​UPDATE {table} SET write_date = write_date WHERE id = (
​SELECT id FROM {table}
​{where_string}
​AND sequence_prefix = (SELECT sequence_prefix FROM {table} {where_string} ORDER BY id DESC LIMIT 1)
​ORDER BY sequence_number DESC
​LIMIT 1
​)
​​RETURNING {field};
​""".format(
​table=self._table,
​where_string=where_string,
​field=self._sequence_field,
​)

...





Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
wrz 24
1460
2
mar 24
3164
2
lut 23
3739
6
paź 20
37952
1
wrz 20
4410