mirror of
https://github.com/mikedilger/gossip.git
synced 2024-09-29 00:11:01 +00:00
Move commands into gossip-bin
This commit is contained in:
parent
6ec3cf58b5
commit
55aa891532
@ -1,7 +1,7 @@
|
||||
use crate::error::{Error, ErrorKind};
|
||||
use crate::globals::GLOBALS;
|
||||
use crate::people::PersonList;
|
||||
use crate::person_relay::PersonRelay;
|
||||
use gossip_lib::error::{Error, ErrorKind};
|
||||
use gossip_lib::globals::GLOBALS;
|
||||
use gossip_lib::people::PersonList;
|
||||
use gossip_lib::person_relay::PersonRelay;
|
||||
use bech32::FromBase32;
|
||||
use nostr_types::{
|
||||
Event, EventAddr, EventKind, Id, NostrBech32, NostrUrl, PrivateKey, PublicKey, RelayUrl,
|
||||
@ -386,7 +386,7 @@ pub fn import_event(cmd: Command, mut args: env::Args, runtime: &Runtime) -> Res
|
||||
login(cmd.clone())?;
|
||||
|
||||
let job = tokio::task::spawn(async move {
|
||||
if let Err(e) = crate::process::process_new_event(&event, None, None, false, true).await {
|
||||
if let Err(e) = gossip_lib::process::process_new_event(&event, None, None, false, true).await {
|
||||
println!("ERROR: {}", e);
|
||||
}
|
||||
});
|
||||
@ -575,7 +575,7 @@ pub fn reprocess_recent(cmd: Command, runtime: &Runtime) -> Result<(), Error> {
|
||||
|
||||
let mut count = 0;
|
||||
for event in events.iter() {
|
||||
if let Err(e) = crate::process::process_new_event(event, None, None, false, true).await
|
||||
if let Err(e) = gossip_lib::process::process_new_event(event, None, None, false, true).await
|
||||
{
|
||||
println!("ERROR: {}", e);
|
||||
}
|
@ -4,6 +4,8 @@
|
||||
// TEMPORARILY
|
||||
#![allow(clippy::uninlined_format_args)]
|
||||
|
||||
mod commands;
|
||||
|
||||
use gossip_lib::comms::ToOverlordMessage;
|
||||
use gossip_lib::error::Error;
|
||||
use gossip_lib::globals::GLOBALS;
|
||||
@ -41,7 +43,7 @@ fn main() -> Result<(), Error> {
|
||||
// If we were handed a command, execute the command and return
|
||||
let args = env::args();
|
||||
if args.len() > 1 {
|
||||
match gossip_lib::commands::handle_command(args, &rt) {
|
||||
match commands::handle_command(args, &rt) {
|
||||
Err(e) => {
|
||||
println!("{}", e);
|
||||
return Ok(());
|
||||
|
@ -5,7 +5,6 @@
|
||||
#![allow(clippy::uninlined_format_args)]
|
||||
|
||||
pub mod about;
|
||||
pub mod commands;
|
||||
pub mod comms;
|
||||
pub mod date_ago;
|
||||
pub mod delegation;
|
||||
|
Loading…
Reference in New Issue
Block a user