@@ -3,13 +3,14 @@ import axiosRetry from "axios-retry";
3
3
import { partition } from "lodash" ;
4
4
import LRUCache from "lru-cache" ;
5
5
import moment from "moment" ;
6
- import { castleDkpTokenRO , dkpBonusesChannelId } from "../config" ;
6
+ import { castleDkpTokenRO } from "../config" ;
7
7
import {
8
8
AdjustmentData ,
9
9
RaidTick ,
10
10
UPLOAD_DATE_FORMAT ,
11
11
} from "../features/dkp-records/raid-tick" ;
12
12
import { MINUTES , MONTHS } from "../shared/time" ;
13
+ import { castledkp2 } from "./castledkp2" ;
13
14
14
15
const route = ( f : string ) => `api.php?function=${ f } ` ;
15
16
@@ -163,7 +164,10 @@ export const castledkp = {
163
164
raid_note : `${ name } ${ threadUrl } ` ,
164
165
} ;
165
166
console . log ( "Creating new raid:" , payload ) ;
166
- const { data } = await client . post < { raid_id : number } > ( route ( "add_raid" ) , payload ) ;
167
+ const { data } = await client . post < { raid_id : number } > (
168
+ route ( "add_raid" ) ,
169
+ payload
170
+ ) ;
167
171
168
172
return {
169
173
eventUrlSlug : event . name
@@ -203,7 +207,10 @@ export const castledkp = {
203
207
raid_note : `${ tick . name } ${ threadUrl } ` ,
204
208
} ;
205
209
console . log ( "Creating raid tick" , payload ) ;
206
- const { data } = await client . post < { raid_id : number } > ( route ( "add_raid" ) , payload ) ;
210
+ const { data } = await client . post < { raid_id : number } > (
211
+ route ( "add_raid" ) ,
212
+ payload
213
+ ) ;
207
214
208
215
// add items to raid
209
216
console . log ( "Adding items to raid" , tick . data . loot ) ;
@@ -219,6 +226,12 @@ export const castledkp = {
219
226
) || [ ]
220
227
) ;
221
228
229
+ // Temporarily create data using the beta service as well; this is not async and is fault tolerant.
230
+ // Primarily, this is being used to test the beta service by ingesting real data.
231
+ castledkp2 . createRaid ( tick ) . catch ( ( error ) => {
232
+ console . log ( `Failed to create raid in beta service: ${ error } ` ) ;
233
+ } ) ;
234
+
222
235
return {
223
236
eventUrlSlug : tick . data . event . name
224
237
. toLowerCase ( )
0 commit comments