File tree Expand file tree Collapse file tree 1 file changed +17
-17
lines changed
Expand file tree Collapse file tree 1 file changed +17
-17
lines changed Original file line number Diff line number Diff line change @@ -52,26 +52,26 @@ async function processor(job: Job) {
5252 if ( receivedPackets !== undefined ) {
5353 const masterServerInfo = unpackMasterPackets ( receivedPackets . packets )
5454
55- const ids = await Promise . all (
56- masterServerInfo . gameServers . map ( ( { ip, port } ) =>
57- prisma . gameServer . upsert ( {
58- where : {
59- ip_port : {
60- ip,
61- port,
62- } ,
63- } ,
64- select : {
65- id : true ,
66- } ,
67- update : { } ,
68- create : {
55+ const ids = [ ] ;
56+ for ( const { ip, port } of masterServerInfo . gameServers ) {
57+ const result = await prisma . gameServer . upsert ( {
58+ where : {
59+ ip_port : {
6960 ip,
7061 port,
7162 } ,
72- } )
73- )
74- ) ;
63+ } ,
64+ select : {
65+ id : true ,
66+ } ,
67+ update : { } ,
68+ create : {
69+ ip,
70+ port,
71+ } ,
72+ } ) ;
73+ ids . push ( result ) ;
74+ }
7575
7676 await prisma . masterServer . update ( {
7777 where : {
You can’t perform that action at this time.
0 commit comments